package com.loongtech.bi.manager.game;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Service;

import com.loongtech.bi.entity.game.EntityActiveUserCurrencyProduceReason;
import com.loongtech.core.jpa.manager.ManagerQueryCacheBase;
import com.loongtech.core.util.Time;
/**
 * 用户的三日流失
 * @author lihui
 *
 */
@Service
public class ActiveUserCurrencyProduceReasonManager extends ManagerQueryCacheBase<EntityActiveUserCurrencyProduceReason> {
	private static final long serialVersionUID = 1L;
	
	public List<Object[]> getData(Date dayStart, Date dayEnd,String queryPlatform, String queryChannel, String queryServer,String currencytype) {
		return findByQuery("select reason,produce,usernum from EntityActiveUserCurrencyProduceReason where startday=:dayStart and endday=:dayEnd and platformid = '"+queryPlatform+"' and channelid = '"+queryChannel+"' and serverid = '"+queryServer+"' and currencytype = "+currencytype+" order by reason desc","dayStart", Time.getDateStr(dayStart), "dayEnd", Time.getDateStr(dayEnd));
	}
}
